<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<title>Install Online Food Cooperative</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.6.0/build/reset-fonts-grids/reset-fonts-grids.css">
		<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.6.0/build/base/base-min.css">
		<link rel="stylesheet" type="text/css" href="css/main.css" media="screen" />
		<link rel="stylesheet" type="text/css" href="css/print.css" media="print" />
		<style type="text/css">
			.path {
				font-family: monospace;
				width: 30em;
			}
		</style>
	</head>
<?php
	define('DS', DIRECTORY_SEPARATOR);
	$installer_path = dirname(__FILE__);
	$root = dirname($installer_path);
	$app = 'app';
	$cake = 'cake';
?>
	<body>
		<div id="doc2" class="yui-t2"> 
			<div id="hd"><!-- header -->
				<h1>Online Food Co-op Software Install</h1>
			</div>
			<div id="bd"><!-- body -->
				<div id="yui-main">
					<div class="yui-b">
						<h2>Welcome to the installer!</h2>
						<p>You've done something right if you're seeing this screen.  Just a few inputs, and you'll be on your way.</p>
						<form method="post" action="install.php">
							<fieldset>
								<legend>Basics</legend>
								<dl>
									<dt>Co-op Name:</dt>
									<dd><input name="name" value="Our Mighty Co-op"/></dd>
									<dt>Contact Email Address:</dt>
									<dd><input name="email" value="contact@"/></dd>
								</dl>
							</fieldset>
							<fieldset>
								<legend>Paths</legend>
								<p>The path to this installer file is: <code><?=$installer_path?></code></p>
								<p>We're guessing your ROOT directory is: <code><?=$root?></code></p>
								<p><label for="root">Alternate ROOT?</label> <input name="root" class="path" value="<?=$root?>"/></p>
								<p>Therefore your APP directory is: <code><span class="rootpath"><?=$root . DS?></span><?=$app?></code></p>
								<p><label for="app">Alternate APP?</label> <span class="rootpath"><?=$root . DS?></span><input name="app" class="path" value="<?=$app?>"/></p>
								<p>And your CAKEPHP directory is: <code><span class="rootpath"><?=$root . DS?></span><?=$cake?></code></p>
								<p><label for="cake">Alternate APP?</label> <span class="rootpath"><?=$root . DS?></span><input name="cake" class="path" value="<?=$cake?>"/></p>
								<p><strong>That's all we need to know there.</strong></p>
							</fieldset>
							<fieldset>
								<legend>Database</legend>
								<p>It's likely you shouldn't need to modify the host or port, unless you have an unusual setup.</p>
								<dl>
									<dt><label for="host">Host:</label></dt>
									<dd><input name="host" value="localhost"/></dd>
									<dt><label for="port">Port:</label></dt>
									<dd><input name="port" value="3306"/></dd>
								</dl>
								<p>The following values will need to change depending on how the database has been configured.  Talk to your MySQL admin to get the appropriate values for these.</p>
								<dl>
									<dt><label for="dbname">Database Name:</label></dt>
									<dd><input name="dbname" value="coop"/></dd>
									<dt><label for="user">Database User Name:</label></dt>
									<dd><input name="user" value="coop-user"/></dd>
									<dt><label for="pass">Database Password:</label></dt>
									<dd><input name="padd" value="YourSecretPassword"/></dd>
								</dl>
							</fieldset>
						</form>
					</div>
					<div class="yui-b">
						<h3>$_SERVER:</h3>
						<pre>
						<?php
							print_r($_SERVER);
						?>
						</pre>
					</div>
				</div>
				<div class="yui-b">
					<p>Step 1</p>
				</div>
			</div>  
			<div id="ft"><!-- footer -->
				<p class="credits">Online Co-op Software by Paul DeLeeuw, &copy; 2009</p>
			</div>  
		</div> 
	</body>
</html>